<template>
    <div>
      <el-card class="margin_30" shadow="always" :body-style="{ padding: '20px' }">
       <el-table :data="list" border stripe>
        <el-table-column 
          prop="id"
          label="退单编号"
         >
        </el-table-column>
        <el-table-column 
          prop="reason"
          label="退单原因"
         >
        </el-table-column>
        <el-table-column 
          prop="productName"
          label="商品名称"
         >
        </el-table-column>
        <el-table-column 
          prop="productName"
          label="操作"
         >
         <template v-slot="scope">
          <el-button type="primary" size="default" @click="goReturnOrderInfo(scope.row.id)">退单详情</el-button>
          
         </template>
        </el-table-column>
       </el-table>
       <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="start"
            :page-sizes="[5, 10, 15, 20]"
            :page-size="limit"
            layout="total, sizes, prev, pager, next, jumper"
            :total="total">
          </el-pagination>
        <!-- card body -->
      </el-card>
      
    </div>
</template>

<script>
import {
  findReturnApply
} from "@/api/orderManage/returnOrder"
import mix from "@/mixins/index"
export default {
  mixins:[mix],
    data() {
        return {
          formData:{
            "createTime": "",
            "handleTime": "",
            "memberUsername": "",
            "orderId": "",
            "orderSn": "",
            "status": ""
          },
          list:[]
        };
    },
    computed: {

    },
    created() {
      this.init()
    },
    mounted() {

    },
    methods: {
      goReturnOrderInfo(id){
        this.$router.push(`/orderManage/returnOrderInfo/${id}` )
      },
      init(){
        findReturnApply(this.start,this.limit,this.formData)
        .then(res =>{
          console.log(res)
          this.list = res.data.rows;
          this.total = res.data.total;
        })
      }
    },
};
</script>

<style scoped lang="scss">

</style>
